<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>内填充外边距</title>
    <style>
        div{
            width: 100px;
            height: 100px;
            background-color:red;
            /*padding-top:50px;
            padding-bottom:50px;
            padding-left:50px;
            padding-right:50px;*/
            padding:50px;
            /*margin-left:100px;
            margin-top:100px;
            margin-bottom:100px;
            margin-right:100px;
            margin:100px;*/
            margin:auto;
        }
    </style>
</head>
<body>
<div>你好</div>
</body>
</html>